import random
sys_num = random.randint(1,1001)
while 1:
    user_num = int(input("请输入一个整数: "))
    if user_num > sys_num:
        print("猜大了")
    elif user_num < sys_num:
        print("猜小了")
    else:
        print("猜对了")
        break
    print(f"正确的数是:{sys_num}")










